package org.mysfit.ctp4j.core.service.impl;

import java.util.List;

import org.modelmapper.ModelMapper;
import org.mysfit.ctp4j.api.vo.SkDataVO;
import org.mysfit.ctp4j.core.service.SkDataService;
import org.mysfit.ctp4j.infra.entity.SkData;
import org.mysfit.ctp4j.infra.mapper.SkDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * sk 服务实现类
 * </p>
 *
 * @author long.gf
 * @since 2022-12-05 12:00:04
 */
@Service
public class SkDataServiceImpl 
	extends AbstractBaseServiceImpl<SkDataMapper, SkData, SkDataVO> 
	implements SkDataService 
{

	@Autowired
	private ModelMapper modelMapper;
	
	@Autowired
	private SkDataMapper skMapper;
	
	private static SkDataService skService;
	
	public static SkDataService getInstance() {
		if(skService == null) {
			skService = new SkDataServiceImpl();
		}
		return skService;
	}
	
	@Override
	protected ModelMapper getModelMapper() {
		return modelMapper;
	}

	@Override
	protected Class<SkDataVO> getVoCLass() {
		return SkDataVO.class;
	}

	@Override
	public List<SkData> getLastSkData(String fid, int count) {
		return skMapper.getLastSkData(fid, count);
	}

}
